from django.conf.urls import patterns, include, url
from django.contrib.auth.views import login, logout, password_change, password_change_done, password_reset, password_reset_done, password_reset_confirm

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    url(r'^$', 'addons.views.index', name='home'),
    # url(r'^mysite/', include('mysite.foo.urls')),
    url(r'^static/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root':
         '/srv/www/htdocs/blenderaddons-django/mysite/static/'}),

    url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': '/srv/www/htdocs/blenderaddons-django/downloads/'}),
    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^polls/$', 'polls.views.index'),
    url(r'^polls/(?P<poll_id>\d+)/$', 'polls.views.detail'),
    url(r'^polls/(?P<poll_id>\d+)/results/$', 'polls.views.results'),
    url(r'^polls/(?P<poll_id>\d+)/vote/$', 'polls.views.vote'),

    url(r'^addons/$', 'addons.views.index'),
    url(r'^addons/(?P<addon_id>\d+)/$', 'addons.views.detail'),
    #(r'^accounts/login/$',  login),
    (r'^accounts/logout/$',  logout),
    (r'^accounts/password_change/$',  password_change),
    (r'^accounts/password_reset/$',  password_reset),
    (r'^accounts/password_reset_confirm/$',  password_reset_confirm),
    #(r'^accounts/register/$',  'profile.views.register'),
    (r'^accounts/', include('registration.backends.default.urls')),

    url(r'^admin/', include(admin.site.urls)),
    url(r'^comments/', include('django.contrib.comments.urls')),

    url(r'^profile/$', 'profile.views.index'),
    url(r'^profile/edit/$', 'profile.views.edit_profile'),
)
